<?php

namespace plugin\colecms\app\admin\validate;



use app\common\validate\BaseValidate;

class AdValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require',
        'ad_position_id' => 'require',
        'media_type' => 'require',
        'name' => 'require',
        'url' => 'require',
        'content' => 'require',
        'end_time' => 'require',
    ];

    protected $field = [
        'id' => 'ID',
        'ad_position_id' => '广告位',
        'media_type' => '广告类型',
        'name' => '广告名称',
        'url' => '链接',
    ];
    protected $scene = [
        "id" => [
            'id',
        ],
        "add" => [
            'ad_position_id',
            'media_type',
            'name',
            'url',
        ],
        "update" => [
            'id',
            'ad_position_id',
            'media_type',
            'name',
            'url',
        ],
    ];
}